﻿<%@ Page Language="vb" ContentType="text/xml" AutoEventWireup="false" CodeBehind="rssView.aspx.vb" Inherits="Assignment4.rssView" %>

<asp:panel id="pnlQuiz" runat="server">
<asp:Repeater id="rptQuizzes" runat="server">
  <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title><%# getTitle()%></title>
        <description>
           <%# getDescription()%>
        </description>
  </HeaderTemplate>

  <ItemTemplate>
        <item>
          <quizpicture><%# GetPicture(DataBinder.Eval(Container.DataItem, "QuizPicture"))%>
          </quizpicture>
          <quizname>
             <%# FormatForXML(DataBinder.Eval(Container.DataItem, "QuizName"))%>
          </quizname>

          <quizdescription>
             <%# FormatForXML(DataBinder.Eval(Container.DataItem,"QuizDescription"))%>
          </quizdescription>
          

          <link>
             <%# GetLink(DataBinder.Eval(Container.DataItem, "QuizId"))%>
          </link>
        
        </item>
  </ItemTemplate>

  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:Repeater>
</asp:panel>


<asp:panel id="pnlComments" runat="server">
<asp:Repeater id="rptComments" runat="server">
  <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title><%# getTitle()%></title>
        <description>
           <%# getDescription()%>
        </description>
  </HeaderTemplate>

  <ItemTemplate>
        <item>
          
          <commentuser>
             <%# GetUser(DataBinder.Eval(Container.DataItem, "UserId"))%>
          </commentuser>

          <commentcontent>
             <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CommentContent"))%>
          </commentcontent>
          
          <commentdate>
             <%# FormatForXML(DataBinder.Eval(Container.DataItem, "CommentDate"))%>
          </commentdate>

          <link>
             <%# GetLink(DataBinder.Eval(Container.DataItem, "QuizId"))%>
          </link>
        
        </item>
  </ItemTemplate>

  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:Repeater>
</asp:panel>